package com.example.demo.service;


import com.example.demo.entity.User;
import com.example.demo.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;


    /**
     * 注册
     * @param user
     * @return
     */
    @Override
    public int InUser(User user) {
        return userMapper.InUser(user);
    }

    @Override
    public Integer SelName(User user) {
        return userMapper.SelName(user);
    }


    @Override
    public Integer checkUser(String account,String password) {
        return userMapper.checkUser(account,password);
    }

    @Override
    public Integer checkAccount(User user) {
        return userMapper.checkAccount(user);
    }

    @Override
    public List<User> rname(String account) {
        return userMapper.rname(account);
    }

    @Override
    public Integer cname(String name) {
        return userMapper.cname(name);
    }


}
